<HTML>
<HEAD>
<TITLE>[Chapter 18] java.applet Reference</TITLE>
<META NAME="author" CONTENT="John Zukowski">
<META NAME="date" CONTENT="Thu Jul 31 14:59:19 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java AWT">
<META NAME="title" CONTENT="Java AWT">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java AWT" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch17_05.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 18</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch18_02.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<H1 CLASS=chapter><A CLASS="TITLE" NAME="JAWT-CH-18">18. java.applet Reference</A></H1>

<DIV CLASS=htmltoc>

<p>
<b>Contents:</b><br>
Introduction to the Reference Chapters<br>
<A HREF="ch18_02.htm">Package diagrams</A><BR>
<A HREF="ch18_03.htm">Applet</A><BR>
<A HREF="ch18_04.htm">AppletContext</A><BR>
<A HREF="ch18_05.htm">AppletStub</A><BR>
<A HREF="ch18_06.htm">AudioClip</A><BR>

<p>
</DIV>

<DIV CLASS=sect1>
<h2 CLASS=sect1><A CLASS="TITLE" NAME="ch18-SECT1-AUTOID.1">18.1 Introduction to the Reference Chapters</A></h2>

<P CLASS=para>
The preceding seventeen chapters cover just about all there is to know 
about AWT. We have tried to organize them logically, and provide all 
the information that you would expect in a reference manual--plus 
much more in the way of examples and practical information about how to 
do things effectively. However, there are many times when you just 
need a reference book, pure and simple: one that's organized alphabetically, 
and where you can find any method if you know the class and package that it 
belongs to, without having to second guess the author's organizational 
approach. That's what the rest of this book provides. It's 
designed to help you if you need to look something up quickly, and find 
a brief but accurate summary of what it does. In these sections, the emphasis 
is on <I CLASS=emphasis>brief</I>; if 
you want a longer description, look in the body of the book. 

<P CLASS=para>
The reference sections describe the following packages: 

<P>
<UL CLASS=itemizedlist>
<li CLASS=listitem><tt CLASS=literal>java.applet</tt> (<A HREF="ch18_01.htm">Chapter 18, <i>java.applet Reference</i></A>)

<P>
<li CLASS=listitem><tt CLASS=literal>java.awt</tt> (<A HREF="ch19_01.htm">Chapter 19, <i>java.awt Reference</i></A>)

<P>
<li CLASS=listitem><tt CLASS=literal>java.awt.datatransfer</tt> (<A HREF="ch20_01.htm">Chapter 20, <i>java.awt.datatransfer Reference</i></A>)

<P>
<li CLASS=listitem><tt CLASS=literal>java.awt.event</tt> (<A HREF="ch21_01.htm">Chapter 21, <i>java.awt.event Reference</i></A>)

<P>
<li CLASS=listitem><tt CLASS=literal>java.awt.image</tt> (<A HREF="ch22_01.htm">Chapter 22, <i>java.awt.image Reference</i></A>)

<P>
<li CLASS=listitem><tt CLASS=literal>java.awt.peer</tt> (<A HREF="ch23_01.htm">Chapter 23, <i>java.awt.peer Reference</i></A>)

<P>
</UL>
<P CLASS=para>
Within each package, classes and interfaces are listed alphabetically.
There is a description and a pseudo-code definition for each class or interface. 
Each variable and method is listed and described. New Java 1.1 classes 
are marked with a black star (<img src="gifs/bstar.gif" alt="(New)" border=0>), as are new methods and new variables. 
Of course, if a class is new, all its 
methods are new. We didn't mark individual methods in new classes. Methods that are deprecated in Java 1.1 are marked with a white star (<img src="gifs/wstar.gif" alt="(Deprecated)" border=0>).

<P CLASS=para>
Inheritance presents a significant problem with documenting
object-oriented libraries, because the bulk of a class's methods
tend to be hiding in the superclasses. Even if you're very
familiar with object-oriented software development, when you're
trying to look up a method under the pressure of some deadline,
it's easy to forget that you need to look at the superclasses in
addition to the class you're interested in itself. Nowhere is
this problem worse than in AWT, where some classes (in particular,
components and containers) inherit well over 100 methods, and provide
few methods of their own. For example, the <tt CLASS=literal>Button</tt>
class contains seven public methods, none of which happens to be
<tt CLASS=literal>setFont()</tt>.  The font used to display a
button's label is certainly settable--but to find it, you
have to look in the superclass <tt CLASS=literal>Component</tt>.

<P CLASS=para>
So far, we haven't found a way around this problem. The description 
of each class has an abbreviated class hierarchy diagram, showing superclasses 
(all the way back to Object), immediate subclasses, and the interfaces 
that the class implements. Ideally, it would be nice to have a list of 
all the inherited methods--and in other parts of Java, that's 
possible. For AWT, the lists would be longer than the rest of this book, 
much too long to be practical, or even genuinely useful. Someday, electronic 
documentation may be able to solve this problem, but we're not there 
yet. 

</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch17_05.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch18_02.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>Printing Arbitrary Content</td>
<td width=171 align=center valign=top><a href="index/idx_a.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>Package diagrams</td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
